

#include "Thread.h"
#include <stdio.h>
#include "MemoryMaps.h"

using namespace std;

class DataMonitor : public Thread
{

public:
	DataMonitor(ThreadPriority pri = Thread::PRIORITY_NORMAL, string _name = "", MemoryMaps * mapManager = NULL)
			: Thread(pri, _name) {
			_mapManager = mapManager;
		};

	void run()
	{
		int i=0;
		while(1) // Declare the periodic actions for the data monitor
		{
			_mapManager->printMemoryMaps();

			if (i%10 == 0)
			{

				//_mapManager->initializeMaps(1);
				//_mapManager->writeFlagUp();
			}
			sleep(10);
		}

	};


private:

	MemoryMaps * _mapManager;
};
